package com.currency.mall.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by Administrator on 2018/12/26.
 */

public class SharesRoyalty implements Parcelable{
    private String id;//": 5,                    #id
    private String sharesId;//": 2,              #股票ID
    private String sharesCode;//": "sh600004",   #股票唯一识别号
    private String type;//": "WEEK",             #日期单位类型：DAY-日计算,WEEK-周计算,MONTH-月计算
    private String val;//": 2,                   #日期值
    private String rate;//": 3.54,               #利率，按百分比

    protected SharesRoyalty(Parcel in) {
        id = in.readString();
        sharesId = in.readString();
        sharesCode = in.readString();
        type = in.readString();
        val = in.readString();
        rate = in.readString();
    }

    public static final Creator<SharesRoyalty> CREATOR = new Creator<SharesRoyalty>() {
        @Override
        public SharesRoyalty createFromParcel(Parcel in) {
            return new SharesRoyalty(in);
        }

        @Override
        public SharesRoyalty[] newArray(int size) {
            return new SharesRoyalty[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSharesId() {
        return sharesId;
    }

    public void setSharesId(String sharesId) {
        this.sharesId = sharesId;
    }

    public String getSharesCode() {
        return sharesCode;
    }

    public void setSharesCode(String sharesCode) {
        this.sharesCode = sharesCode;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getVal() {
        return val;
    }

    public void setVal(String val) {
        this.val = val;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(sharesId);
        dest.writeString(sharesCode);
        dest.writeString(type);
        dest.writeString(val);
        dest.writeString(rate);
    }
}
